package com.itqf.service.impl;

import com.itqf.mapper.DtsRoleMapper;
import com.itqf.service.DtsRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * projectName: store_parent
 *
 * @author: 赵伟风
 * time: 2021/6/8 10:45
 * description:
 */
@Service
public class DtsRoleServiceImpl implements DtsRoleService {

    @Autowired
    private DtsRoleMapper roleMapper;

    /**
     * 角色id数组查询对应的角色名称
     *
     * @param ids
     * @return
     */
    @Override
    public Collection<String> findRoleNames(Integer[] ids) {

        Collection<String> roles = roleMapper.queryRoleNames(ids);

        return roles;
    }

    @Override
    public List<Map<String, String>> findRoles() {

        List<Map<String, String>> roles = roleMapper.queryRoles();

        return roles;
    }
}
